package com.woniu.mytest.listener;

import com.rabbitmq.client.Channel;
import com.woniu.config.RabbitMQConfig;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class ReceiveHandler {

    @RabbitListener(queues = {RabbitMQConfig.QUEUE_EMIAL})
    public void sendEmail(String msg, Channel channel) {
        System.out.println("recv msg: " + msg);
    }
}